package com.njtoyo.taxi.admin.rest.wrapper.local_service.merchant;

import com.njtoyo.taxi.admin.mapper.master.enums.local_service.LifeMerchantAccountRoleLevel;
import com.njtoyo.taxi.admin.mapper.master.enums.local_service.LifeMerchantAccountState;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

@Data
public class LifeMerchantAccountAddWrapper {

    @ApiModelProperty(value = "地址ID,自提点,无自提点默认商家")
    private Long addressId;

    @ApiModelProperty(value = "商户表ID")
    @NotNull(message = "商户表不能为空")
    private Long merchantId;

    @ApiModelProperty(value = "角色等级 0:admin[店长],1:emp[员工]")
    private LifeMerchantAccountRoleLevel roleLevel;

    @ApiModelProperty(value = "头像URL")
    private String avatarUrl;

    @ApiModelProperty(value = "真实姓名")
    @NotNull(message = "真实姓名不能为空")
    private String name;

    @ApiModelProperty(value = "昵称")
    @NotNull(message = "昵称不能为空")
    private String nickName;

    @ApiModelProperty(value = "密码")
    @Pattern(regexp = "^[0-9a-zA-Z_]{6,12}$", message = "密码只能使用英文数字,个数6-12位")
    @NotNull(message = "密码不能为空")
    private String password;

    @ApiModelProperty(value = "手机号")
    @NotNull(message = "手机号码不能为空")
    @Pattern(regexp = "^1\\d{10}$", message = "手机号码格式不准确")
    private String mobileNumber;

    @ApiModelProperty(value = "open_id")
    private String wxOpenId;

    @ApiModelProperty(value = "状态 0:active[激活],1:freeze_up[冻结]")
    @NotNull(message = "状态不能为空")
    private LifeMerchantAccountState state;

}
